package prog;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;

/**
 *
 * @author kelyane
 */
public class Main {
    public static void main(String[] args) throws FileNotFoundException, IOException {
       
        Grafo grafo = LerArquivoGrafo.criarGrafo(args[1]);
                      
        switch(args[0]){
            case "bfs" :{
                Bfs bfs = new Bfs(grafo,0);
                bfs.executeBfs();
                TestePrinter.distanciasBfs(bfs);
                break;
            }
            case "ts":{
                TopologicalSort ts = new TopologicalSort(grafo);
                List<Integer> listTS = ts.executeTopologicalSort();
                TestePrinter.listaTS(grafo, listTS);
                break;
            }
            case "scc":{
                Dfs dfs = new Dfs(grafo);
                dfs.executeDFS();
                DfsScc dfsc = new DfsScc(grafo, dfs);
                dfsc.executeDFS();
                TestePrinter.imprimeSCC(grafo, dfsc);
                break;
            }
            case "mst":{
                Kruskal krs = new Kruskal(grafo, 0);
                krs.executeKruskal();
                //TestePrinter.somaMenorCaminho(krs);
                krs.imprimeResultado();
                
                break;
            }
            
        }
        
                
    }
    
    
    
    
}